Skip to main content

Token Pair With Liquidity

Queries all the token pair pools, their VLP address, liquidity amount, and APR (Annual Percentage Rate). Can specify a token Id as argument to only fetch pools containing that token.

query Token_pair_with_liquidity($token: String, $limit: Int, $offset: Int) {
pool {
token_pair_with_liquidity(token: $token, limit: $limit, offset: $offset) {
results {
pair {
token_1
token_2
}
vlp
total_liquidity
apr
}
pagination {
total_count
limit
offset
}
}
}
}

Example

curl --request POST \
--header 'content-type: application/json' \
--url 'https://testnet.api.euclidprotocol.com/graphql' \
--data '{"query":"query Token_pair_with_liquidity($token: String, $limit: Int, $offset: Int) {\n pool {\n token_pair_with_liquidity(token: $token, limit: $limit, offset: $offset) {\n results {\n pair {\n token_1\n token_2\n }\n vlp\n total_liquidity\n apr\n }\n pagination {\n total_count\n limit\n offset\n }\n }\n }\n}","variables":{"token":"euclid"}}'

Open in Playground

Arguments

  • token (String): The token Id of the token to get pools for.
  • limit (Int): Optional limit to the number of results to return.
  • offset (Int): Optional number of pools to skip before starting to return the result set. Used for pagination.

Return Fields

FieldTypeDescription
token_1StringThe first token in the pool.
token_2StringThe second token in the pool.
vlpStringThe contract address for the VLP that hosts this pool.
total_liquidityStringThe total liquidity for the token pair.
aprStringThe annual percentage rate for providing liquidity to the pair.
total_countIntThe total number of results available.
limitIntThe maximum number of results returned per query request.
offsetIntThe number of results to skip before starting to return the result set.